package com.fanshuai.springcloud.client.bookservice;

import com.fanshuai.springcloud.domain.Book;
import com.fanshuai.springcloud.web.response.CallResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

public interface BookServiceClient {
    @GetMapping("/book/list")
    CallResult<List<Book>> list();

    @GetMapping("/book/get")
    CallResult<Book> one(long id);

    @PostMapping("/book/add")
    CallResult<Boolean> add(Book book);

    @PostMapping("book/delete")
    CallResult<Boolean> delete(long id);
}
